/*
 * This class keeps all the gameStatistics for a player, plus one for prior history
 */

#ifndef PLAYER_STATISTICS_H
#define PLAYER_STATISTICS_H

#include "gamestatistic.h"
#include <vector>
#include <QDebug>
#include <QVector>

class PlayerStatistics
{
public:
    PlayerStatistics();
    ~PlayerStatistics();
    QVector<GameStatistic*>* getGameStatistics();
    GameStatistic getPriorHistory();
    GameStatistic getTotals();
    void addGameStatistic(GameStatistic *gs);
    void setPriorHistory(GameStatistic *gs);
    int getGamesPlayed();
    void setGamesPlayed(int inputGamesPlayed);
    void incrementGamesPlayed();
    int getGamesPitched();
    void setGamesPitched(int inputGamesPitched);
    void incrementGamesPitched();
    void setTotals(GameStatistic *gs);
    void pushLastGameToDB(int player_id, int game_id);



private:
     GameStatistic priorHistory;
     QVector<GameStatistic*>* gameStats;
     GameStatistic totals;
     int gamesPlayed;
     int gamesPitched;

};

#endif // PlayerStatistics_H
